<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8" %>
<%@ page trimDirectiveWhitespaces="true" %>
<%@ page import="java.awt.Rectangle" language="java"%>
<%@ page import="java.awt.Robot" language="java"%>
<%@ page import="java.awt.Toolkit" language="java"%>
<%@ page import="javax.imageio.ImageIO" language="java"%>
<%@ page import="java.util.Date" language="java"%>
<%@ page import="com.desksoft.utility.date.DateUtil" language="java"%>
<%
	Robot robot = new Robot();
	response.setHeader("Content-Disposition", "attachment; filename=Screenshot-" + DateUtil.getDate(new Date(), "yyyyMMddhhmmss") + ".png");
	response.setContentType("application/png;charset=utf-8");
	ImageIO.write(robot.createScreenCapture(new Rectangle(Toolkit.getDefaultToolkit().getScreenSize())), "png", response.getOutputStream());
%>